package ClassData;

import ClassData.Visitor.IVisitor;
import ClassData.Visitor.IVisitorElement;

/**
 * 
 * @note changed by Dominik Ollesz 
 */
public class ExceptionHandler implements IVisitorElement {

  	short start_pc;   // begin of method in code-array 
  	short end_pc;     // end of method in code-array
  	short handler_pc; // show tecalled opcode
  	short catch_type; // Guilty catch type (like finally->any)

	public ExceptionHandler(short start_pc, short end_pc, short handler_pc, short catch_type) {
	 	this.start_pc=start_pc;
	 	this.end_pc=end_pc;
	 	this.handler_pc=handler_pc;
	 	this.catch_type=catch_type;	
	}

	public short getStartPC() {
		return start_pc;
	}
	
	public short getEndPC() {
		return end_pc;
	}
	
	public short getHandlerPC() {
		return handler_pc;
	}
	
	public short getCatchType() {
		return catch_type;
	}
	
	@Override
	public void receive_Visitor(IVisitor visitor) {
		visitor.visit_ExceptionHandler(this);
	}
	
}
 